/* 视图管理页面专用样式 */

/* 视图控制区域 */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-controls .btn-primary {
    white-space: nowrap;
}

.view-options {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.view-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input#materialFilter {
    min-width: 200px;
}

/* 查询区域样式 */
.filter-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-row .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.filter-row .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.filter-row .form-group input,
.filter-row .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.filter-row .form-group input:focus,
.filter-row .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* 可视化视图区域 */
.visual-view {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    min-height: 400px;
}

/* 货位状态视图样式 */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 1rem;
}

.location-item {
    position: relative;
    height: 100px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.location-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.location-id {
    font-weight: bold;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.location-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.location-goods {
    font-weight: 500;
    font-size: 0.85rem;
}

.location-quantity {
    font-size: 0.8rem;
    color: #666;
}

.location-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.3);
}

/* 货位状态颜色 */
.empty {
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px dashed #ccc;
}

.occupied {
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
}

.disabled {
    background-color: rgba(255, 0, 0, 0.3);
    color: #333;
}

.location-selected {
    background-color: rgba(33, 150, 243, 0.8);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

/* 货位物料视图样式 */
.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.material-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.material-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.material-location {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.material-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.material-name {
    color: #667eea;
    font-weight: 500;
}

.material-quantity {
    color: #28a745;
    font-weight: 500;
}

/* 货位启用/禁用视图样式 */
.location-enable-disable-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.location-enable-disable-header {
    display: flex;
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem 0;
}

.location-enable-disable-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.location-enable-disable-row:hover {
    background-color: #f8f9fa;
}

.header-cell, .cell {
    flex: 1;
    padding: 0 0.5rem;
    text-align: center;
}

.header-cell:first-child, .cell:first-child {
    flex: 0 0 50px;
}

.header-cell:last-child, .cell:last-child {
    flex: 0 0 100px;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-enabled {
    background-color: #d4edda;
    color: #155724;
}

.status-disabled {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .view-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .location-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .location-item {
        height: 80px;
        font-size: 0.7rem;
    }
    
    .material-grid {
        grid-template-columns: 1fr;
    }
    
    .location-enable-disable-header,
    .location-enable-disable-row {
        display: none;
    }
    
    .location-enable-disable-header:first-child,
    .location-enable-disable-row:first-child {
        display: flex;
    }
}